---
title: Has form fields
summary: Reports whether a submitted PDF contains form fields, using either the iTextSharp client or the Syncfusion helper.
status: draft
owner: Not determined from source
last_reviewed: 2026-09-17
library: PdfAPI
reference_type: embedded
operation_id: OP-HAS-FORM-FIELDS
trigger: Client submits POST v1/info/fields/exist with PDF bytes
---

# OP-HAS-FORM-FIELDS: Has form fields

Reports whether a submitted PDF contains form fields, using the caller-selected inspection client.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-HAS-FORM-FIELDS |
| **Trigger** | Client submits `POST v1/info/fields/exist` with PDF bytes |
| **Entry endpoint** | [`POST v1/info/fields/exist`](../endpoints/info-controller.md#post-v1%2Finfo%2Ffields%2Fexist) |
| **Owning component** | `InfoController.HasFormFields(byte[], bool)` → `PdfClientService.HasFormFields` \| `PdfHelper` (Syncfusion) |
| **Inputs** | Request body: `byte[]` PDF; query: `useClient` (default `true`) |
| **Outputs** | Bare `bool` |
| **Failure response** | No `try`/`catch` on this action — any exception produces framework exception detail (`IncludeErrorDetailPolicy.Always`) before `ApiResponseHandler` runs; the final client-visible envelope is unknown** (see [Endpoints: Error response shape](../endpoints.md#error-response-shape)) |

## Steps

1. `useClient` (default `true`) selects the inspection implementation ([BR-PDFAPI-021](../business-rules.md#br-pdfapi-021-form-field-inspection-client-selection)):
   - `true` (default): `PdfClientService.HasFormFields` (iTextSharp) is invoked, which first validates the `%PDF-` signature ([BR-PDFAPI-005](../business-rules.md#br-pdfapi-005-pdf-validity-by-file-signature)).
   - `false`: `PdfHelper.HasFormFields` (Syncfusion) is invoked instead.

   `PdfClientService.HasFormFields` is implemented in `PdfAPI.Core`, documented in full at [Detect form fields](../../../libraries/pdfapi-core/operations/op-06-detect-form-fields.md) (OP-06). `PdfHelper.HasFormFields` is implemented in `PdfApi.SyncFusionCore`, documented in full at [Inspect and flatten PDF form fields](../../../libraries/pdfapi-syncfusioncore/operations/inspect-and-flatten-pdf-form-fields.md) (OP-SFC-013). Both behaviors are summarized here only as observed on this request path.

   > **Origin:** The `useClient = true` detection behavior in this step is implemented in
   > `PdfAPI.Core`; the `useClient = false` detection behavior is implemented in
   > `PdfApi.SyncFusionCore`. See the linked operation pages for the full delegated logic.
2. On the `useClient = true` path, a non-PDF payload raises `PdfException`, which escapes uncaught to the framework, producing exception detail before `ApiResponseHandler` runs; the final client-visible envelope is unknown**.
3. The bare `bool` result is returned — HTTP `200`.

## Process flow

The following diagram shows the client-selection and validation sequence for the form-fields existence check.

```mermaid
flowchart TD
    A["POST v1/info/fields/exist"] --> B{"useClient?"}
    B -->|true default| C["PdfClientService.HasFormFields: iTextSharp"]
    B -->|false| D["PdfHelper.HasFormFields: Syncfusion"]
    C --> E{"Valid PDF?"}
    E -->|No| F["PdfException escapes to framework: 500"]
    E -->|Yes| G["Return bool, 200"]
    D --> G
```

## Transaction and side effects

| Aspect | Finding |
| --- | --- |
| Unit of work | None |
| Commit point | Not applicable — no database access |
| Records written | None |
| Downstream calls | None |
| Repeat-call behavior | Read-only; safe to repeat |

## Logging

| Surface | Written content |
| --- | --- |
| — | No dedicated logging observed on this path beyond framework-level exception logging on an uncaught failure |

## Error handling

- Non-PDF payload on the `useClient = true` path: `PdfException` escapes uncaught, producing framework exception detail before `ApiResponseHandler` runs; the final client-visible envelope is unknown** ([BR-PDFAPI-005](../business-rules.md#br-pdfapi-005-pdf-validity-by-file-signature); see [Endpoints: Error response shape](../endpoints.md#error-response-shape)).

## Related documentation
- [API index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Endpoints](../endpoints.md)
- [Authentication and authorization](../authentication-authorization.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Data model](../data-model.md)
- [Operational runbook](../operational-runbook.md)
- [Tech debt](../tech-debt.md)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- PdfAPI\Controllers\v1\InfoController.cs
- PdfAPI.Core\Services\PdfClientService.cs
- PdfApi.SyncFusionCore\PdfHelper.cs
